package com.learn.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import redis.clients.jedis.JedisCluster;

@RestController
@RequestMapping("/redis")
public class RedisClusterTest {
    @Autowired
    private JedisCluster jedisCluster;

    @GetMapping("/redisCluster/test")
    public String test() {
        jedisCluster.set("test", "testRedisTest");
        return "success";
    }
}
